package bmaso.purest.mock;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import com.mockobjects.servlet.MockPageContext;

public class MyMockPageContext extends MockPageContext {
	private Map<String, Object> attributes = new HashMap<String, Object>();
	private HttpServletResponse response;
	
	public Object getAttribute(String name) {
		return attributes.get(name);
	}
	
	public void setAttribute(String name, Object value) {
		attributes.put(name, value);
	}
	
	public void removeAttribute(String name) {
		attributes.remove(name);
	}
	
	public void setResponse(HttpServletResponse response) {
		this.response = response;
	}
	
	@Override
	public HttpServletResponse getResponse() {
		return response;
	}
}
